package com.zzzn.rhtx.controller;

import com.zzzn.rhtx.entity.KeepConnectResponse;
import com.zzzn.rhtx.service.RhtxClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 登录接口调用
 * @auther Yuzhong.Guo
 * @date 2022/11/3 16:55
 */
@RequestMapping(value = "/sys")
@RestController
public class BaseController {

    @Autowired
    private RhtxClient rhtxClient;

    /**
     * 用户强制登出
     * @return
     */
    @GetMapping(value = "/forcelogout")
    public KeepConnectResponse forceLogout() {
        return rhtxClient.forceLogout();
    }

    /**
     * 用户登出
     * @return
     */
    @GetMapping(value = "/userlogout")
    public KeepConnectResponse userLogout() {
        return rhtxClient.userLogout();
    }

}
